package com.pai4j.remote.user;

import com.pai4j.common.bean.PAIPageResponseBeanUtil;
import com.pai4j.common.bean.PAIResponseBean;
import com.pai4j.domain.dto.UpdatePasswordDTO;
import com.pai4j.domain.vo.request.request.SlideVerificationVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient(name = "pai4j-user-service", contextId = "SlideVerificationClient")
public interface SlideVerificationClient {
    
    @PostMapping("/user-service/slide/verification/save")
    PAIResponseBean<Long> save(@RequestBody SlideVerificationVO slideVerificationVO);
    
    
    @PostMapping("/user-service/slide/verification/status/{id}/{status}")
    PAIResponseBean<Long> updateStatus(@PathVariable Long id, @PathVariable Integer status);
    
    @GetMapping("/user-service/slide/verification/get")
    PAIResponseBean<SlideVerificationVO> get();
    
    @PostMapping("/user-service/slide/valid/{accessToken}")
    PAIResponseBean<Boolean> validate(@PathVariable String accessToken);
    
    @GetMapping("/page")
    PAIPageResponseBeanUtil<SlideVerificationVO> page(@RequestParam(value = "status", required = false) Integer status,
                                                      @RequestParam(value = "pageNo", required = false, defaultValue = "1") Integer pageNo,
                                                      @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize);
    
}

